class Player {
    private id :number;
    private static nextId :number = 0;

    constructor() {
        this.id = Player.nextId++;
    }

    getId() :number {
        return this.id;
    }

    equals(player :Player) :boolean {
        if (player === undefined || player === null)
            return false;

        return (this.id === player.id);
    }
}